package com.kk.travel.dao.impl;

import com.kk.travel.admin.Spot;
import com.kk.travel.dao.DAO;
import com.kk.travel.dao.SpotDao;

public class SpotDaoImpl extends DAO<Spot> implements SpotDao {

	@Override
	public void update(Spot spot){
		String sql="update kk_spot set spotName=?,description=?,introduction=?,price=?,position=?,score=?,pricture_path=? where id=?";
		
		update(sql, spot.getSpotName(),spot.getDescription(),spot.getIntroduction(),spot.getPrice(),spot.getPosition(),spot.getScore(),spot.getPricturePath(),spot.getId());
	}
	
	@Override
	public Spot get(Integer id) {
		String sql="select * from kk_spot where id=?";
		return get(sql, id);
	}

}
